﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.Threading;
using AutoMapper;
using Sautom.Queries;
using Sautom.Services.Dto;
using Sautom.WcfServer.Interfaces;
using Sautom.WcfServer.TransportDto;

namespace Sautom.WcfServer.Services
{
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
    sealed public partial class CommonService : ICommonService
    {
        #region Properties
        public ICommonFinder CommonFinder { get; set; }
        #endregion

        #region Constructors
        public CommonService(ICommonFinder commonFinder)
        {
            CommonFinder = commonFinder;
        }

        #endregion

        #region Implementation of ICommonService

        public ICollection<EventNortificationOutput> NortificationList()
        {
            return Mapper.Map<ICollection<EventNortificationOutput>>(CommonFinder.NortificationList());
        }

        #endregion
    }
}
